<template>
  <pInfor :foo="foo"></pInfor>
</template>
<script setup>
import pInfor from '../components/firstPage/pInfor.vue'
import axios from 'axios'
import { useRoute } from 'vue-router'
import { onMounted, ref } from 'vue'
const routerRank = useRoute()
const foo = ref([])
onMounted(() => {
  acceptRank()
})
console.log(routerRank.query.row)
function acceptRank() {
  axios({
    url: 'http://localhost:8080/entry/hotChart/detail',
    method: 'post',
    contentType: 'application/json',
    headers: {
      token: localStorage.getItem('token')
    },
    data: {
      num: routerRank.query.row
    }
  }).then(function (res) {
    console.log('详情' + JSON.stringify(res.data.data))
    foo.value = res.data.data
  })
}
</script>
